import Cookies from 'js-cookie'

/* key的公共污染问题，需要统一管理 */
const tokenKey = 'token'

/* token */
export function getToken() {
  return Cookies.get(tokenKey)
}

export function setToken(token: string) {
  return Cookies.set(tokenKey, token)
}

export function removeToken() {
  return Cookies.remove(tokenKey)
}

export default {
  getToken,
  setToken,
  removeToken
}
